<template>
  <div v-if="tableData">
    <div class="table-default" style="padding: 0;">
      <el-table :data="tableData.dataRes"  v-loading="loading" border>
        <el-table-column prop="fbillno" label="采购单号" min-width="250" />
        <el-table-column prop="fseq" label="行号" width="60" />
        <el-table-column prop="fsupplierid_name" label="供应商代号" width="150" />
        <el-table-column prop="supplierOrder" label="供应商送货单单号" width="200" />
        <el-table-column prop="fmaterialid" label="品号" min-width="150" />
        <el-table-column prop="fmaterialname" label="品名" min-width="200" />
        <el-table-column prop="fmaterialmodel" label="规格" min-width="200" />
        <el-table-column prop="barcode" label="箱号" min-width="180" />
        <el-table-column prop="funitid_name" label="单位" />
        <el-table-column prop="quantityreceived" label="已暂收的数量" min-width="150" />
        <el-table-column prop="repositoryname" label="库位" min-width="150" />
      </el-table>
      <Paginate />
    </div>
  </div>
</template>
  <script lang="ts" setup>
import { computed, nextTick, onMounted, ref } from 'vue'
import { toRaw } from '@vue/reactivity'
// import Create from './create.vue'
import { useGetList } from '/admin/composables/curd/useGetList'
import { useDestroy } from '/admin/composables/curd/useDestroy'
import { useOpen } from '/admin/composables/curd/useOpen'
import { useRouter } from 'vue-router'
const router = useRouter()

const props = defineProps({
  proID: Number,
  id: Number,
})
const api = `purchasing/provisionalreceipt/${props.id}?provisional_id=1`

const { data, query, search, reset, loading } = useGetList(api)
const { destroy, deleted } = useDestroy()
const { open, close, title, visible, id } = useOpen()

const tableData = computed(() => data.value?.data.data)



const num = ref('100.0000')

onMounted(() => {
  search()
  deleted(reset)
})
</script>
  
  <style lang="css">
.backBtn {
  margin: 20px 10px;
}
</style>
  